package com.xing.binbackend.pattern.observer31;

// 4. 具体观察者实现
public class InventoryService implements OrderObserver {
    @Override
    public void onOrderStatusChange(Order order) {
        if ("PAID".equals(order.getStatus())) {
            System.out.println("[库存] 扣减订单商品库存: " + order.getItems());
            // 实际库存操作逻辑...
        }
    }
}
